import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
  return request({
    url: `common/v1/adminDict`,
    method: 'get',
    params
  })
}

// 查询会员列表列表
export function listCustomer(data) {
  return request({
    url: '/userManager/customer/list',
    method: 'post',
    data
  })
}

// 查询会员列表详细
export function getCustomer(id) {
  return request({
    url: '/userManager/customer/' + id,
    method: 'get'
  })
}

// 新增会员列表
export function addCustomer(data) {
  return request({
    url: '/userManager/customer',
    method: 'post',
    data: data
  })
}

// 修改会员列表
export function updateCustomer(data) {
  return request({
    url: '/userManager/customer',
    method: 'put',
    data: data
  })
}

// 删除会员列表
export function delCustomer(id) {
  return request({
    url: '/userManager/customer/' + id,
    method: 'delete'
  })
}

// 导出会员列表
export function exportCustomer(query) {
  return request({
    url: '/userManager/customer/export',
    method: 'get',
    params: query
  })
}
//获取会员卡列表信息
export function getCustomerCard(params) {
  return request({
    url: '/userManager/customer/card/list/',
    method: 'get',
    params,
  })
}

// 获取会员卡使用记录

export function cardBillList(params) {
  return request({
    url: '/userManager/customer/card/bill/list/',
    method: 'get',
    params,
  })
}
// 获取权益卡列表信息
export function equityCardList(query) {
  return request({
    url: '/userManager/customer/equity/card/list',
    method: 'get',
    params: query
  })
}
// 获取权益卡详情
export function customerCardDetail(id) {
  return request({
    url: '/userManager/customer/equity/card/detail/' + id,
    method: 'get'
  })
}
// 获取数字权益卡门店权益列表
export function cardShopList(query) {
  return request({
    url: '/equityManager/equityCard/cardShopList',
    method: 'get',
    params: query
  })
}

// 获取coin详情列表
export function customerCoinList(query) {
  return request({
    url: '/userManager/customer/coin/list',
    method: 'get',
    params: query
  })
}
// 获取权益卡详情
export function referrerList(query) {
  return request({
    url: `/userManager/customer/referrerList`,
    method: 'get',
    params: query
  })
}
//黑名单列表
export function blackList(query) {
  return request({
    url: `/userManager/customer/blackList`,
    method: 'get',
    params: query
  })
}
// 新增黑名单
export function addBlackList(params) {
  return request({
    url: '/userManager/customer/addBlackList',
    method: 'post',
    params
  })
}
// 删除黑名单
export function deleteBlackList(id) {
  return request({
    url: '/userManager/customer/deleteBlackList/' + id,
    method: 'delete'
  })
}
// 黑名单功能限制
export function addBlackLimit(params) {
  return request({
    url: '/userManager/customer/addLimit',
    method: 'put',
    params
  })
}
